//microcommand define opbind
inject(["database"])
signature("<target:user> <origin:user>", "手动绑定账号", { authority: 4 })
action(async ({ session }, targetS, originS) => {
const [, targetPlatform, targetUID] = targetS.match(/([^:]*):(.*)/)
const [, originPlatform, originUID] = originS.match(/([^:]*):(.*)/)
const target = await ctx.database.getUser(targetPlatform, targetUID)
const origin = await ctx.database.getUser(originPlatform, originUID)
await ctx.database.set("binding", { bid: target.id }, { aid: origin.id })
return "已绑定。"
})